package com.ctshk.rpc.custom.service.impl;

import com.ctshk.rpc.custom.entity.CustomizedQuotationTouristType;
import com.ctshk.rpc.custom.mapper.CustomizedQuotationTouristTypeMapper;
import com.ctshk.rpc.custom.req.quotation.TouristTypeDTO;
import com.ctshk.rpc.custom.service.ICustomizedQuotationTouristTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 旅客类型 服务实现类
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-13
 */
@DubboService
public class CustomizedQuotationTouristTypeServiceImpl extends ServiceImpl<CustomizedQuotationTouristTypeMapper, CustomizedQuotationTouristType> implements ICustomizedQuotationTouristTypeService {

    @Autowired
    private CustomizedQuotationTouristTypeMapper touristTypeMapper;


    /**
     * 根据类型和主数据id获取旅客信息
     *
     * @param id
     * @param type 1：套餐,2：团期
     */
    @Override
    public TouristTypeDTO queryTouristType(Long id,Long mainDataId, int type) {
        TouristTypeDTO dto = touristTypeMapper.queryTouristType(id,mainDataId,type);
        if (dto != null){
            return dto;
        }
        return null;
    }
}
